{template 'weheader'}
{if $reside}<script src="{MODULE_URL}template/weui/js/city-picker.min.js"></script>{/if}
{if $isloc}<script type="text/javascript" src="{TEMPLATE_WEUI}js/QQgetLocation.js"></script>{/if}
<link rel="stylesheet" href="{MODULE_URL}template/weui/style/post.css">
<style>

.weui_msg .weui_extra_area {margin-bottom: 5px;}
.weui_extra_area {z-index:0;}
.record .weui_cells:first-child {margin-top:30px;}
.record .weui_cells {margin:0;}
.record img{width:1.2rem;height:1.2rem;}

.weui_uploader_files {width:60%;float:left; list-style: none;height:100px; background: no-repeat center center; background-size: 100px auto; margin-bottom: 2px;text-align:center;}
.dayu_uploader_input {float: left; position: relative; margin: 0px; margin-bottom: 0px; width: 40%; height: 100px;; border: 0px solid #D9D9D9;}
.dayu_uploader_input span{line-height:15px;margin-top:5px;color:#666;}
.dayu_uploader_input span:last-child{margin-top:0px;position: absolute;bottom:0;display:block;}

.weui_uploader_file {text-align:center;
  float: left;
  margin-right: 9px;
  margin-bottom: 9px;
  width: auto;
  height: 100px;
  background: no-repeat center center;
  background-size: 100px auto;
  padding:100px auto;}
.m-img {background-position: top center;padding-bottom: 0;}
.m-img img{width:100%;height:auto;}
.m-masker {background-color: rgba(0, 0, 0, 0);position: relative;}
</style>

	{template 'insert/header'}

	{if $activity['isinfo']}
		{template 'insert/field_address'}
	{/if}

<form action="{php echo $this->createMobileUrl('dayu_form', array('weid' => $_W['uniacid'], 'id' => $reid))}" class="" enctype="multipart/form-data" method="POST" id="form">
<input type="hidden" name="repeat" value="<?php echo md5(sha1(time())); ?>">

	{if $activity['paixu']==0}
		{template 'insert/join'}
	{/if}
	
	{if !empty($par['kami']) && pdo_tableexists('dayu_kami')}
		{template 'insert/field_kami'}
	{/if}
	
	{if !empty($linkage)}
		{template 'insert/field_linkage'}
	{/if}
	
	<div class="fields">
	
	{loop $ds $fields}
	
	{if in_array($fields['type'], array('text', 'phone', 'tel', 'idcard'), TRUE)}
		{template 'insert/field_text'}
	{/if}
	
	{if $fields['type'] == 'photograph'}
		{template 'insert/field_photograph'}
	{/if}
		
	{if $fields['type'] == 'email'}
		{template 'insert/field_email'}
	{/if}
				
	{if $fields['type'] == 'number'}
		{template 'insert/field_number'}
	{/if}
				
	{if $fields['type'] == 'textarea'}
		{template 'insert/field_textarea'}
	{/if}
				
	{if $fields['type'] == 'radio'}
		{template 'insert/field_radio'}
	{/if}
				
	{if $fields['type'] == 'checkbox'}
		{template 'insert/field_checkbox'}
	{/if}
						
	{if $fields['type'] == 'select'}
		{template 'insert/field_select'}
	{/if}

	{if $fields['type'] == 'image'}
    <div class="weui_cells weui_cells_form">
        <div class="weui_cell">
            <div class="weui_cell_bd weui_cell_primary">
                <div class="weui_uploader">
                    <div class="weui_uploader_bd row">
                        <div class="weui_uploader_files col-60">   
                            <input type="hidden" name="field_{$fields['refid']}_{$fields['bind']}" accept="image/*" capture="camera" value="" {if $fields['essential']}required tips="{$fields['tixing']}"{/if}/>                        
                            <image class="middle" onclick="show(this,'show{$fields['refid']}')" id="show{$fields['refid']}" src="{php echo tomedia($fields['image'])}" style="height:100px;width:auto;" />
                        </div>
                        <div class="dayu_uploader_input col-40" data="field_{$fields['refid']}_{$fields['bind']}" onclick="upimg(this,{$fields['refid']})" id="{$fields['refid']}">
							{$fields['title']}{if $fields['essential']} <span class="f-red f18">*</span>{/if}
							<span class="f12 left">{php echo urldecode($fields['description'])}</span>
							<span class="weui_btn weui_btn_mini weui_btn_default left">上传图片</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
	{/if}
				
	{if $fields['type'] == 'calendar'}
		{template 'insert/field_calendar'}
	{/if}
		
	{if $fields['type'] == 'range'}
		{template 'insert/field_range'}
	{/if}
		
	{if $fields['type'] == 'reside'}
		{template 'insert/field_reside'}
	{/if}
	
	{/loop}
	</div>
	
	{if $activity['plural']==1}
		{template 'insert/pics'}
	{/if}
	
	{if $activity['isvoice']==1}
		{template 'insert/voice'}
	{/if}
	
	{if $activity['paixu']==1}
		{template 'insert/join'}
	{/if}
	
    <div class="weui_btn_area row">
	{if !empty($activity['agreement'])}
		{template 'insert/field_agreement'}
	{/if}
		{template 'insert/field_var'}
		<input type="hidden" name="token" value="{$_W['token']}" />
        <button class="weui_btn {$btncolor}" name="submit" type="submit" id="formSubmitBtn">{$submitname}</button>
    </div>
</form>
	{template 'insert/field_footer'}
	{if !empty($par['comment']) && pdo_tableexists('dayu_comment')}
	</div>
        <div class="weui_tab_bd_item">
            {template 'insert/comment'}
        </div>
	{/if}
</div>
	{template 'insert/popup'}
	
	{template 'insert/script'}
{template 'footers'}